Skip to content

Conversation

SanderMuller
Copy link
Contributor

Fix TS errors with skipLibCheck: false by adding typesVersions

This PR fixes TypeScript module resolution errors that occur when a project has skipLibCheck: false set.

Currently, if socket.io-client or pusher-js are not installed, TypeScript still attempts to resolve them, leading to errors like:
TS2307: Cannot find module 'socket.io-client' or its corresponding type declarations.

Fix

  • Added typesVersions in package.json to exclude socket.io-client and pusher-js from type resolution when missing.
  • This prevents TypeScript from enforcing type checks on optional dependencies.

No Breaking Changes

This only affects TypeScript behavior and does not impact runtime or bundled output.

Closes

Fixes #415

@taylorotwell taylorotwell merged commit a442e93 into laravel:2.x Feb 12, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to build application due to missing type declarations.
2 participants